package com.huilian.iotbox.admin.quartz.job;

import com.huilian.iotbox.data.service.LogManipulateService;
import com.huilian.iotbox.data.utils.DateTimeUtils;
import lombok.extern.slf4j.Slf4j;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author 龙 路 飞
 * @CreateDate: 2021-11-22 14:39
 * @Description:
 */
@Slf4j
public class ClearDataLogManipulateJob implements BaseJob  {
    @Autowired
    private LogManipulateService logManipulateService;
    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        log.info("--------------定时任务 日志删除开始 时间{}---------------", DateTimeUtils.currTime());
        logManipulateService.deleteByTime();
        log.info("--------------定时任务 日志删除结束 end时间{}---------------", DateTimeUtils.currTime());
    }
}
